"""WarehouseManagerDjango URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path

from web.views.logs import read_log
from web.views.user import login, register, CheckLogin, logout, logoff, get_users, set_user_level, user_delete
from web.views.order import order_search, get_warehouses, get_orders, order_add, order_update, order_delete, getOrderInfo
from web.views.warehouse import warehouse_search, warehouse_add, warehouse_update, warehouse_delete
from web.views.task import submit, getInfo,search, delete
urlpatterns = [
    path('admin/', admin.site.urls),
    path('user/login/', login),  # 登录
    path('user/register/', register),   # 注册
    path('user/CheckLogin/', CheckLogin),   # 登录验证
    path('user/logout/', logout),   # 退出登录
    path('user/logoff/', logoff),   # 用户注销
    path('user/get_users/', get_users),   # 获取用户列表
    path('user/set_user_level/', set_user_level),   # 设置用户权限级别
    path('user/delete/', user_delete),  # 删除任务信息

    path('order/search/', order_search),  # 订单数据查询
    path('order/get_warehouses/', get_warehouses),  # 仓库列表查询
    path('order/get_orders/', get_orders),  # 订单列表查询
    path('order/add/', order_add),  # 新增订单
    path('order/update/', order_update),  # 修改订单
    path('order/delete/', order_delete),  # 删除订单
    path('order/getOrderInfo/', getOrderInfo),  # 获取单一订单信息

    path('warehouse/search/', warehouse_search),  # 仓库数据查询
    path('warehouse/add/', warehouse_add),  # 新增仓库
    path('warehouse/update/', warehouse_update),  # 修改仓库
    path('warehouse/delete/', warehouse_delete),  # 删除数据

    path('task/submit/', submit),  # 任务提交
    path('task/getInfo/', getInfo),  # 获取任务信息
    path('task/search/', search),  # 查询任务列表信息
    path('task/delete/', delete),  # 删除任务信息

    path('logs/read_log/', read_log),  # 读日志
]
